package com.zq.exception;

import com.zq.vo.ResultVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@Slf4j
@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(value = {AuthorizationException.class})
    public ResultVo<Object> handleAuthorizationException(Exception e){
        return ResultVo.fail("权限不足");
    }

}
